package hotLeetcode;

public class FibonacciSequenceFinder {



    public static void between(int a, int b) {
        int prev = 0;
        int curr = 1;
        
        boolean found = false;
        while (!found) {
            int next = prev + curr;
            if (next == b) {
                break;
            } else if (next > b) {
                found = true;
            } else {
                if (next != a) {
                    System.out.print(next + " ");
                }
                prev = curr;
                curr = next;
            }
        }
    }
}